package org.dtrd.modules.archive;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 患者档案常量配置
 *
 * @author xiao
 * @date 2022/6/9 2:28 PM
 */
public final class ArchiveConstant {

    /**
     * 爱吃及吃得多的食物
     */
    @Getter
    @AllArgsConstructor
    public enum DietLikeEat {
        /**
         * 油炸食品
         */
        FIRED(1, "油炸食品"),
        DESSERT(2, "甜点"),
        DRIEDFRUIT(3, "干果"),
        VEGETABLE(4, "蔬菜"),
        FRUIT(5, "水果"),
        REDMEAT(6, "红肉（猪羊狗牛）"),
        WHITEMEAT(7, "白肉（鸡鸭鱼虾）");

        int type;
        String name;

        public static DietLikeEat valueOf(int type) {
            for (DietLikeEat value : values()) {
                if (value.type == type) {
                    return value;
                }
            }
            return null;
        }
    }

    /**
     * 爱喝及喝得多的饮料
     */
    @Getter
    @AllArgsConstructor
    public enum DietLikeDrink {
        /**
         * 甜牛奶
         */
        SWEETMEALK(1, "甜牛奶"),
        TASTELESSMEALK(2, "淡牛奶"),
        SOYMILK(3, "甜豆浆"),
        TASTELESSSOYMILK(4, "淡豆浆"),
        MILKTEA(5, "甜奶茶"),
        TEA(6, "茶"),
        WATER(7, "开水"),
        COFFEE(8, "甜咖啡"),
        TASTELESSCOFFEE(9, "淡咖啡"),
        CARBONATEDDRINKS(10, "碳酸饮料");

        int type;
        String name;

        public static DietLikeDrink valueOf(int type) {
            for (DietLikeDrink value : values()) {
                if (value.type == type) {
                    return value;
                }
            }
            return null;
        }
    }

    /**
     * 确诊情形-因何确诊
     */
    @Getter
    @AllArgsConstructor
    public enum ConfirmReason {
        /**
         * 因有上述症状就医而确诊
         */
        SYMPTOM(1, "因有上述症状就医而确诊"),
        OTHERDISEASE(2, "因其他疾病就医而被发现"),
        PHYSICALEXAMINATION(3, "因健康体检而发现"),
        OTHERREASON(4, "因其他原因偶然发现");

        int type;
        String name;

        public static ConfirmReason valueOf(int type) {
            for (ConfirmReason value : values()) {
                if (value.type == type) {
                    return value;
                }
            }
            return null;
        }
    }

}
